package StrategyMode.version5;

import StrategyMode.version5.CashSuper;

/**
 * Created by ycq on 2018/10/18.
 */
public class CashContext {

    private CashSuper cs;
    //通过构造方法，传入具体的收费策略
    public CashContext(CashSuper cashSuper){
        this.cs=cashSuper;
    }
    //根据收费策略的不同，获得计算结果
    public double GetResult(Double money){
        return cs.acceptCash(money);
    }

}
